home *** CD-ROM | disk | FTP | other *** search
/ Aminet 43 / Aminet 43 (2001)(GTI - Schatztruhe)[!][Jun 2001].iso / Aminet / game / 2play / BattleDuel.lha / BattleDuel / BattleDuel_Install < prev    next >
Text File  |  2001-03-01  |  7KB  |  258 lines

  1. ;======================================================================
  2. ;
  3. ; BattleDuel Install Script $VER: Install 1.7 (9.9.99)
  4. ;
  5. ; Copyright © 1995-1999 Jochen Terstiege
  6. ;
  7. ;======================================================================
  8. ;
  9. ;======================================================================
  10. ; language strings
  11. ;======================================================================
  12.  
  13. (set language
  14.     (askchoice
  15.         (prompt ("Please select a language:\nBitte wählen Sie eine Sprache aus:"))
  16.         (help @askchoice-help)
  17.         (choices "English"
  18.                     "Deutsch")
  19.     )
  20. )
  21.  
  22. (if (= language 0)
  23.     (
  24.         (set #hello "\nWelcome to the BattleDuel Installation and Update\n\n\Freeware version 1.7.105")
  25.         (set #update (cat "BattleDuel is already installed on your system. "
  26.                                 "Some old files will be deleted and the new ones installed."))
  27.         (set #select_destination "Please create or select a directory where the BattleDuel files should be copied to!")
  28.         (set #destination_help "Choose a destination directory or create one yourself.")
  29.         (set #install_to1 "\nInstall BattleDuel to \"")
  30.         (set #install_to2 "\" ?")
  31.         (set #have_fun "Have fun with BattleDuel...")
  32.         (set #which_chipset "Which chipset do you have?")
  33.         (set #which_icons "Which icons do you want to install?")
  34.         (set #warning_msg (cat "This update should only be used with version 1.5.42 or higher "
  35.                                     "of BattleDuel! If you apply it to an older version, there could "
  36.                                     "be some problems with the old landscapes."))
  37.         (set #assign_msg (cat "The assign BD: is no longer necessary. Please remove the line from "
  38.                                 "your user-startup."))
  39.     )
  40. )
  41. (if (= language 1)
  42.     (
  43.         (set #hello "\nWillkommen zur BattleDuel Installation und Update\n\n\Freeware Version 1.7.105")
  44.         (set #update (cat "BattleDuel ist auf ihrem System schon installiert. "
  45.                                 "Einige alte Dateien werden gelöscht und die neuen Dateien werden installiert."))
  46.         (set #select_destination "Bitte erstellen Sie ein Verzeichnis oder wählen Sie aus, wo die BattleDuel-Dateien installiert werden sollen!")
  47.         (set #destination_help "Wählen Sie ein Verzeichnis aus oder erstellen Sie selber eins.")
  48.         (set #install_to1 "\nBattleDuel nach \"")
  49.         (set #install_to2 "\" installieren?")
  50.         (set #have_fun "Viel Spaß mit BattleDuel...")
  51.         (set #which_chipset "Welchen Chipsatz haben Sie?")
  52.         (set #which_icons "Welche Icons wollen Sie installieren?")
  53.         (set #warning_msg (cat "Dieses Update sollte nur mit Version 1.5.42 oder neuer von "
  54.                                     "BattleDuel benutzt werden! Wenn Sie es auf eine ältere Version "
  55.                                     "anwenden, gibt es evtl. Probleme mit den alten Landschaften. "))
  56.         (set #assign_msg (cat "Das Assign BD: wird nicht mehr benötigt! Bitte entfernen Sie es aus "
  57.                                     "der User-Startup."))
  58.     )
  59. )
  60.  
  61. ;======================================================================
  62. ; variables
  63. ;======================================================================
  64.  
  65. (set inputdir    (pathonly @icon))        ; from where we were started
  66.  
  67. ;======================================================================
  68. ; welcome
  69. ;======================================================================
  70.  
  71. (message #hello)
  72.  
  73. ;======================================================================
  74. ; ask for directory
  75. ;======================================================================
  76.  
  77. (set def (getassign "BD"))        ; default destination
  78. (if (= def "")
  79.     (
  80.         (set def "Work:")
  81.         (set bd_dest
  82.             (askdir
  83.                 (prompt #select_destination)
  84.                 (default def)
  85.                 (help #destination_help)
  86.             )
  87.         )
  88.         (message (cat #install_to1 bd_dest #install_to2))
  89.         (if (exists (tackon bd_dest "BattleDuel"))
  90.             (set update true)
  91.         )
  92.     )
  93.     (
  94.         (set assign true)
  95.         (set bd_dest def)
  96.         (set update true)
  97.     )
  98. )
  99.  
  100. (makeassign "BD" bd_dest)
  101. (set @default-dest bd_dest)
  102.  
  103. (if (= update true)
  104.     (message #update)
  105. )
  106.  
  107. ;======================================================================
  108. ; check for old version
  109. ;======================================================================
  110.  
  111. (if (= update true)
  112.     (    (set version (getversion "BD:BattleDuel"))
  113.         (set ver (/ version 65536))
  114.         (set rev (- version (* ver 65536)))
  115.         (if (and (= ver 1) (< rev 5))
  116.             ( (message #warning_msg) )
  117.         )
  118.     )
  119. )
  120. ;======================================================================
  121. ; ask for chipset
  122. ;======================================================================
  123.  
  124. (set chipset
  125.     (askchoice
  126.         (prompt #which_chipset)
  127.         (help @askchoice-help)
  128.         (choices "ECS" "AGA" "Graphicboard")
  129.         (default 0)
  130.     )
  131. )
  132.  
  133. ;======================================================================
  134. ; delete old files
  135. ;======================================================================
  136.  
  137. (if (= update true)
  138.     (
  139.         (delete "BD:Landscapes/ECS/LandscapeUR.iff")
  140.         (delete "BD:Landscapes/AGA/LandscapeUR.iff")
  141.         (delete "BD:Mods/mod.BattleDuel")
  142.     )
  143. )
  144.  
  145. ;======================================================================
  146. ; copy files
  147. ;======================================================================
  148.  
  149. (complete 0)
  150.  
  151. (if (not (exists "BD:Gfx"))
  152.     (makedir "BD:Gfx")
  153. )
  154. (if (not (exists "BD:Landscapes"))
  155.     (makedir "BD:Landscapes")
  156. )
  157. (if (not (exists "BD:Mods"))
  158.     (makedir "BD:Mods")
  159. )
  160. (if (not (exists "BD:Settings"))
  161.     (makedir "BD:Settings")
  162. )
  163. (if (not (exists "BD:Catalogs"))
  164.     (makedir "BD:Catalogs")
  165. )
  166.  
  167. (complete 10)
  168. (copyfiles (source "BattleDuel") (dest "BD:"))
  169.  
  170. (complete 20)
  171. (if (= chipset 0)
  172.     (copyfiles (source "Gfx/ECS") (dest "BD:Gfx/ECS") (all))
  173. )
  174. (if (= chipset 1)
  175.     (copyfiles (source "Gfx/AGA") (dest "BD:Gfx/AGA") (all))
  176. )
  177. (if (= chipset 2)
  178.     (copyfiles (source "Gfx/GFXBOARD") (dest "BD:Gfx/GFXBOARD") (all))
  179. )
  180.  
  181. (complete 30)
  182. (if (= chipset 0)
  183.     (copyfiles (source "Landscapes/ECS") (dest "BD:Landscapes/ECS") (all))
  184. )
  185. (if (= chipset 1)
  186.     (copyfiles (source "Landscapes/AGA") (dest "BD:Landscapes/AGA") (all))
  187. )
  188. (if (= chipset 2)
  189.     (copyfiles (source "Landscapes/GFXBOARD") (dest "BD:Landscapes/GFXBOARD") (all))
  190. )
  191.  
  192. (complete 40)
  193. (copyfiles (source "Mods") (dest "BD:Mods") (all))
  194. (complete 50)
  195. (copyfiles (source "Settings") (dest "BD:Settings") (all))
  196. (complete 60)
  197. (copyfiles (source "Catalogs") (dest "BD:Catalogs") (all))
  198.  
  199. ;======================================================================
  200. ; copy selected language
  201. ;======================================================================
  202.  
  203. (if (= language 0)
  204.     ( (copyfiles (source "English") (dest "BD:") (all)) )
  205. )
  206. (if (= language 1)
  207.     ( (copyfiles (source "Deutsch") (dest "BD:") (all)) )
  208. )
  209. (complete 70)
  210.  
  211. ;======================================================================
  212. ; which icons?
  213. ;======================================================================
  214.  
  215. (set icons
  216.     (askchoice
  217.         (prompt #which_icons)
  218.         (help @askchoice-help)
  219.         (choices "Normal" "MagicWB" "GlowIcons")
  220.         (default 0)
  221.     )
  222. )
  223.  
  224. (if (= icons 0)
  225.     (copyfiles (source "Icons") (dest "BD:") (all))
  226. )
  227. (if (= icons 1)
  228.     (copyfiles (source "MWB_Icons") (dest "BD:") (all))
  229. )
  230. (if (= icons 2)
  231.     (
  232.         (copyfiles (source "Glow_Icons") (dest "BD:") (all))
  233.         (delete (cat bd_dest ".info"))
  234.         (rename "BD:BattleDuel_Drawer.info" (cat bd_dest ".info"))
  235.     )
  236. )
  237. (complete 80)
  238.  
  239. ;======================================================================
  240. ; set tooltypes
  241. ;======================================================================
  242.  
  243. (tooltype
  244.     (dest "BD:BattleDuel")
  245.     (settooltype "DISPLAY_ID" "0x0")
  246. )
  247. (complete 90)
  248.  
  249. (if (= assign true)
  250.     ( (message #assign_msg) )
  251. )
  252.  
  253. (makeassign "BD")
  254.  
  255. (complete 100)
  256.  
  257. (exit #have_fun)
  258.